<template>
	<view class="page">
		<!-- 搜索框 -->
		<view class="search">
			<view class="search_input">
				<image class="icon" src="@/static/icon/search-icon.png" mode="widthFix"></image>
				<input class="text" type="text" :value="search" placeholder="搜索医生、疾病、科室" />
			</view>
			<view class="search_text" @click="gotoPage('/pagesCommon/search/result')">
				搜索
			</view>
		</view>
		<!-- 标题 -->
		<view class="title">
			<view class="text">
				历史记录
			</view>
			<view class="more">
				<view class="icon">
					<image src="../../static/icon/delete-icon.png" mode="widthFix"></image>
				</view>
			</view>
		</view>
		<!-- 历史记录 -->
		<view class="history">
			<view class="history_item">
				感冒
			</view>
			<view class="history_item">
				感冒感冒感冒
			</view>
			<view class="history_item">
				感冒感冒感冒感冒感冒感冒感冒
			</view>
			<view class="history_item">
				感冒
			</view>
			<view class="history_item">
				感冒
			</view>
			<view class="history_item">
				感冒
			</view>
			<view class="history_item">
				感冒
			</view>
			<view class="history_item">
				感冒
			</view>
			<view class="history_item">
				感冒
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				search: ''
			};
		},
		methods: {
			gotoPage(url) {
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {

		.search {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 30rpx;

			.search_input {
				flex: 0 0 80%;
				padding: 30rpx 20rpx;
				display: flex;
				align-items: center;
				border-radius: 100rpx;
				background: rgba(238, 238, 238, 0.5);

				.icon {
					width: 24rpx;
					height: 24rpx;
					margin-right: 20rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}

				input {
					width: 100%;
					font-size: 24rpx;
				}
			}

			.search_text {
				flex: 0 0 20%;
				font-size: 28rpx;
				color: #3B6CFE;
				text-align: center;
			}
		}

		.history {
			padding: 20rpx;
			display: flex;
			flex-wrap: wrap;
			align-items: center;

			.history_item {
				font-size: 28rpx;
				padding: 4rpx 20rpx;
				margin-right: 25rpx;
				margin-bottom: 30rpx;
				text-align: center;
				border-radius: 100rpx;
				background: rgba(238, 238, 238, 0.5);
			}
		}
	}
</style>